<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let num1 = Number(prompt("输入城市的污染指数"))
        if (0 < num1 && num1 < 100) {
            alert('良好')
        } else if (101 < num1 && num1 <= 200) {
            alert('轻度污染')
        } else if (201 <= num1 && num1 <= 300) {
            alert('中度污染')
        } else if (num1 > 300) {
            alert('重度污染')
        }
    </script>
</body>

</html>